let {bytecode, interface} = require('./01_compile')
let Web3 = require('web3')
let web3 = new Web3()
web3.setProvider('http://localhost:7545')
let contract = new web3.eth.Contract(JSON.parse(interface))
//合约拥有者的账号地址
const account = '0x4B249c138A04FaE2b48441cAAbde22bF32cB9613'
// 部署合约
contract.deploy({
    data : bytecode,
    arguments : ['helloworld']
}).send({
    from : account,
    gas : '3000000',
}).then(instance => {
    console.log("contract address : ", instance.options.address)
})
